package io.renren.modules.mqtt.service.impl;

import io.renren.modules.mqtt.entity.MqttEvent;
import io.renren.modules.mqtt.service.IEventService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 心跳消息，用于保持mqtt连接
 *
 * @author lhb
 * @date 2023/6/13
 */
@Service("heartbeatEventService")
@Slf4j
public class HeartbeatEventService implements IEventService {

    @Override
    public boolean eventHandler(MqttEvent event) {
        System.out.println("收到心跳事件，不用处理");
        log.info("收到心跳事件，不用处理");
        return true;
    }

    @Override
    public String getMessType() {
        return "heartbeat";
    }
}
